#ifndef _menu_h
#define _menu_h

#include "zf_common_headfile.h"


#define SW_6    P20_2
#define SW_5    P20_6
#define SW_4    P20_7
#define SW_3    P20_8
#define SW_2    P20_9
#define SW_1    P20_10

// 当前菜单中参数值类型
#define PARASET_F 0 // float
#define PARASET_S 1 // int

// 参数菜单数量上限
#define MAX_ROWS 10

// 调参菜单中参数的最大数量
#define MAX_MENU2_NUM 10
// 获取该函数中参数的类型及个数
#define FLASH_INIT MAX_MENU2_NUM

extern bool menu_level;
extern unsigned char menu_index;
extern unsigned char menu2_mode ;
extern unsigned char menu2_limit ;

extern int *intvalue[MAX_MENU2_NUM];
extern float *floatvalue[MAX_MENU2_NUM];

extern unsigned char flash_index;

extern char(*amenu2_init_pfc[])(char);

// 参数菜单个数
#define ROWS 7

void menu_init(void);
//void button_init(void);

void menu_entry(void);
void menu_select(unsigned char event);
void menu2_select(unsigned char event);
void menu2_init(void);
void menu_display(void);
void menu2_display(void);
void info_found(unsigned char index);
char menu2_set_speed(char index);
char menu2_speed_pid_l(char index);
char menu2_speed_pid_r(char index);
char menu2_servo_pid(char index);
char menu2_aim_distance(char index);
char menu2_setting (char index);
char menu2_target_speed (char index);


#endif
